# Contributor: Lucas Ramage <ramage.lucas@protonmail.com>
# Maintainer: Lucas Ramage <ramage.lucas@protonmail.com>
pkgname=rke
pkgver=1.3.12
pkgrel=0
pkgdesc="Rancher Kubernetes Engine"
options="!check net chmod-clean"
url="https://github.com/rancher/rke"
license="Apache-2.0"
arch="all"
makedepends="go"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/rancher/rke/archive/v$pkgver.tar.gz"

# secfixes:
#   1.3.2-r0:
#     - CVE-2021-25742

build() {
	go build -v -ldflags "-X main.VERSION=$pkgver"
}

package() {
	install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname
	install -Dm644 README.md "$pkgdir"/usr/share/doc/$pkgname/README.md
}

sha512sums="
a041a6f1d2f17d7600294b197036b28081eb2c17d03b4c05bb04a0c8a54b1155baa8d50400aa08574ca0eb7fdc56a728cc396bac2e115cfccb375ca90e495583  rke-1.3.12.tar.gz
"
